package com.wooophone.webapp.mpyeah.action;

import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.validator.annotations.RequiredStringValidator;
import com.wooophone.common.web.action.BaseAction;
import com.wooophone.mpyeah.biz.BrandCategoryBiz;
import com.wooophone.mpyeah.entity.BrandCategory;

public class BrandCategoryAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Autowired
	private BrandCategoryBiz brandCategoryBiz;

	@Autowired
	private BrandCategory brandCategory;

	@RequiredStringValidator(fieldName = "id", key = "id.null", message = "未提供ID")
	public String viewBrandsById() {
		try {
			brandCategory = brandCategoryBiz.get(id);
			return SUCCESS;
		} catch (Exception e) {
			e.printStackTrace();
			return ERROR;
		}
	}

	public BrandCategoryBiz getBrandCategoryBiz() {
		return brandCategoryBiz;
	}

	public void setBrandCategoryBiz(BrandCategoryBiz brandCategoryBiz) {
		this.brandCategoryBiz = brandCategoryBiz;
	}

	public BrandCategory getBrandCategory() {
		return brandCategory;
	}

	public void setBrandCategory(BrandCategory brandCategory) {
		this.brandCategory = brandCategory;
	}
}
